package com.example.forum.services;

import com.example.forum.model.Board;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author hanzishuai
 * @date 2025/4/30 11:35
 * @Description
 */
public interface IAdminService {
    // TODO 禁用和删除 帖子、回复帖、板块、站内信、用户


    // 禁用

    /**
     * Created by hanzishuai on 2025/4/30
     *
     * @param articleId 帖子 Id
     * @Description 根据 帖子Id 禁用帖子
     */
    void banArticle(Long articleId);

    /**
     * Created by hanzishuai on 2025/4/30
     *
     * @param articleReplyId
     * @return void
     * @Description 根据 帖子回复Id 禁用帖子回复
     */
    void banArticleReply(Long articleReplyId);




    /**
     * Created by hanzishuai on 2025/4/30
     *
     * @param userId
     * @return void
     * @Description 根据 用户Id 禁用用户
     */
    void banUser(Long userId);


    // 删除

    /**
     * Created by hanzishuai on 2025/4/30
     *
     * @param articleId 帖子 Id
     * @Description 根据 帖子Id 删除帖子
     */
    void deleteArticle(Long articleId);

    /**
     * Created by hanzishuai on 2025/4/30
     *
     * @param articleReplyId
     * @return void
     * @Description 根据 帖子回复Id 删除帖子回复
     */
    void deleteArticleReply(Long articleReplyId);


    /**
     * Created by hanzishuai on 2025/4/30
     *
     * @param boardId
     * @return void
     * @Description 根据 板块Id 禁用板块
     */
    void banBoard(Long boardId);

    /**
     * Created by hanzishuai on 2025/4/30
     *
     * @param boardId
     * @return void
     * @Description 根据 板块Id 删除板块
     */
    @Transactional
    void deleteBoard(Long boardId);

    /**
     * Created by hanzishuai on 2025/5/6
     * @param board  板块对象
     * @Description  创建板块
     */
    void addBoard(Board board);

}
